<template>
  <div>
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="vertical"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      router
    >
      <el-menu-item index="/data/create">
        <span class="fa fa-plus-square"></span>新建资源
      </el-menu-item>
      <el-menu-item index="/data/label">
        <span class="fa fa-address-book"></span>资源标记
      </el-menu-item>
      <el-menu-item index="/data/state">
        <span class="fa fa-flag"></span>资源状态
      </el-menu-item>
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-date"></i>资源统计
        </template>
        <el-menu-item index="/data/sem">推广资源</el-menu-item>
        <el-menu-item index="/data/seo">免费资源</el-menu-item>
        <el-menu-item index="/data/getsick">住院患者</el-menu-item>
      </el-submenu>
      <el-menu-item index="/data/search">
        <span class="fa fa-search"></span>搜索资源
      </el-menu-item>
      <el-menu-item index="/data/notice">
        <span class="fa fa-volume-up"></span>最新公告
      </el-menu-item>
      <el-menu-item index="/data/socket">
        <span class="fa fa-comments"></span>在线聊天
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  mounted () {
    this.activeIndex = this.$router.currentRoute.path
  },
  data () {
    return {
      activeIndex: '/data/notice'
    };
  },
  methods: {
    handleSelect (key, keyPath) {
    }
  }
};
</script>
<style lang="stylus" scoped>
.subnav {
  border-top: 1px solid rgb(255, 208, 75);
}

.subnav {
  width: 200px;
  height: 100%;
  background: #545c64;

  .el-col {
    width: 100%;
  }
}

.el-submenu {
  .el-menu-item {
    min-width: 169px;
    text-align: center;

    i {
      color: #fff !important;
    }
  }
}

.fa {
  margin-right: 5px;
  width: 24px;
  text-align: center;
  font-size: 18px;
  vertical-align: middle;
}

.link {
  display: block;
  color: #fff;
}

.el-menu-item {
}

.el-menu-item:hover {
  color: rgb(255, 208, 75) !important;
}

.el-submenu__title i, .el-submenu__icon-arrow {
  color: #fff !important;
}
</style>
